<div class="form">

    <?php
    /**
     * @var $form CActiveForm
     */
    $form = $this->beginWidget('CActiveForm', array(
    'id' => 'facility-form',
    'enableAjaxValidation' => false,
)); ?>

    <p class="note">Trường có dấu <span class="required">*</span> là bắt buộc.</p>

    <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model, 'title'); ?>
        <?php echo $form->textField($model, 'title', array('size' => 60, 'maxlength' => 255)); ?>
        <?php echo $form->error($model, 'title'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'description'); ?>
        <?php
        $this->widget('application.extensions.ckeditor.CKEditor', array(
            'model'=>$model,
            'attribute'=>'description',
            'language'=>'vi',
            'editorTemplate'=>'basic',
        ));
        /*$this->widget('application.extensions.tinymce.ETinyMce',
            array(
                'name' => 'Facility_description',
                'useSwitch' => false,
                'editorTemplate' => 'full'
            )
        );*/
        ?>
        <?php //echo $form->textArea($model,'description',array('rows'=>6, 'cols'=>50)); ?>
        <?php echo $form->error($model, 'description'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'address'); ?>
        <?php echo $form->textField($model, 'address', array('size' => 60, 'maxlength' => 255)); ?>
        <?php echo $form->error($model, 'address'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'teacher_id'); ?>
        <?php echo $form->listBox($model, 'teacher_id',Facility::listTeacher(),array('size'=>1)); ?>
        <?php echo $form->error($model, 'teacher_id'); ?>
        <div class="hint">Giáo viên chủ nhiệm cơ sở</div>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'all_teacher'); ?>
        <?php echo $form->checkBoxList($model, 'all_teacher',Facility::listTeacher()); ?>
        <?php echo $form->error($model, 'all_teacher'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'status'); ?>
        <?php echo $form->listBox($model, 'status',array(1=>'Hoạt động',2=>'Không hoạt động'),array('size'=>1)); ?>
        <?php echo $form->error($model, 'status'); ?>
    </div>

    <div class="row buttons">
        <?php echo CHtml::submitButton('Submit'); ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->